<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

// 路由组限制后台必须登录才能访问
// Route::group(['middleware' => 'login'], function(){

	// 后台首页路由
	Route::get('/admin', function() {
		return view('admin.index.index');
	});

	//后台商品分类添加路由
	//Route::post('/admin/add','cateController@add');
	// 后台商品分类路由
	Route::controller('/admin/cate','cateController');
	// 后台商品路由
	Route::controller('/admin/goods','GoodsController');
	//后台商品评论管理
	Route::controller('/admin/comments','CommentsController');

	//隐式路由============= 后台用户访问
	Route::controller('/admin/user','UserController');
	//隐式路由============= 友情链接
	Route::controller('/admin/link','LinkController');
	
	
// });

// 后台登录路由
Route::controller('/admin/login', 'AdminLoginController');

// 前台登录路由
Route::controller('/login', 'HomeLoginController');

// 路由组限制前台
Route::group(['middleware' => 'hlogin'], function(){

});

// 注册路由
Route::controller('/register', 'HomeRegisterController');

//激活路由
Route::get('/jihuo', function(){
	return view('home.register.success');
});

// 找回密码路由
Route::controller('/findpwd', 'FindPwdController');

//路由=========================前台首页
Route::get('/',function(){
	return view('home.home.index');
});
//隐式路由=========================前台购物车
Route::controller('/cart','CartController');
//隐式路由=========================前台商品列表页
Route::controller('/list','ListController');
//隐式路由=========================前台结算页
Route::get('/order',function(){
      return view('home.order.order');
});
//隐式路由=========================前台下单收藏页
/*Route::get('/home/detail',function(){
	return view('home.detail.detail');
});*/

//前台个人中心
Route::get('/userinfo',function(){
	return view('home.userinfo.userinfo');
});
